Design Time Composite Authorization Definitions

SoftwareShield System Feature Guide > Authorization Definitions > Authorization Definition Types > Design-Time Composite Authorization Definitions

## Design-Time Composite Authorization Definitions

A Design-Time Composite Authorization Definition is a special Authorization Definition that effectively allows you to activate numerous other Authorization Definitions all at once by using a single Activation Code.

The Authorization Definitions that are contained inside the Design-Time Composite are collectively called a "payload". Individually, each one is called a "leaf" Authorization Definition. You can view the composite as a "tree" with only one level of branches, but an arbitrary number of them. Each branch, points to an individual leaf Authorization Definition. Each leaf Authorization Definition in the payload may also use a parameter value that is stored with it (if required).

You must define the entire payload of a Design-Time Composite Authorization Definition at "design-time" (when you are designing your license). There is a minor exception to this rule regarding using parameter values taken from User Defined Fields at run-time, see below.

When activated, each of the leaf definitions is immediately and individually activated (in Auth ID order) using the appropriate parameter value (if any).

Parameter values for leaf Authorization Definitions can be numeric type or date type, as required by the individual Authorization Definition type of that leaf. Parameter values for leaf Authorization Definitions can be either defined at design-time as a constant value, or can be taken at run-time, during activation, from the numeric or date value stored in a User Defined Field. However, the decision for the source of the parameter must also be made at design-time.

Only one type of Authorization Definition is not an eligible candidate for being used in the payload of a Design-Time Composite Authorization Definition: the Run-Time Composite Authorization Definition.

The Activation Code that is generated for a Design-Time Composite Authorization Definition does give you the option of using a shelf-life. The resulting Activation Code must be used within the shelf-life after the date it has been issued, or the code itself will expire and will cease to work. Note you can override the shelf-life you defined when you created the license at the time you generate an Activation Code with the Manual-Activator.

The Activation Code that is generated for a Design-Time Composite Authorization Definition is a "single-use" code by default. If single-use is enabled, they can only be used once. However, note that you may reissue it to the same customer on another day, and the code will be different (due to the embedded shelf-life date) and therefore may be used by the customer. You have the option of turning off single-use when you define your license, but do not have the option of overriding it later.

Design-Time Composite Authorization Definitions do not require a parameter to be sent (explicitly or implicitly).

Design-Time Composite Authorization Definitions can be used as a payload for either type of Composite Authorization Definitions. This allows you to create complex trees of Authorization where one composites "leaf" is actually another composite which has numerous other "leaves". Generally this is not necessary and due to complexity - not recommended.

### When To Use A Design-Time Composite Authorization Definition

Create a Design-Time Composite Authorization Definition if you have complex license activation logic which you wish to simplify for a user and your support staff. Use it when you need to do more than one basic activation operation with a single Activation Code.

A good example of how you might use this definition is where you wish to issue to a customer an Activation Code that would permanently release all expiration on your software and the same code could also be used for a recovery (in case they mess with the license). You could define a Design-Time Composite Authorization Definition that has two leaves (1) An Authorization Definition for Release All Expiration and (2) An Authorization Definition for Recovery. Set the Shelf-Life to zero, and the Single-Use flag to false, and that one code could be used forever for both purposes on that machine. If you also had machine locking turned off, that one code could be used forever for both purposes on any machine. This is just one simple example.

There are an infinite number of possibilities for how you might use a Design-Time Composite Authorization Definition, but the basic premise is the same for all of them: Use it when you want to do more than one thing with a single Activation Code, and you know at Design-Time what that combination of things is.

### More Information

If you do not know at design-time what the possible combination of things is you will want to do, yet need to do more than one thing at once, consider using a Run-Time Composite Authorization Definition.

For help in actually creating an Design-Time Composite Authorization Definition, please see Authorization Definition Dialog in the SoftwareShield License Manager Reference.

For help in actually creating the payload of the Design-Time Composite Authorization Definition (including how to define parameters for leaves), please see Creating Composite Definitions in the SoftwareShield License Manager Reference.

For help on setting initial values of the User Defined Fields (numeric and date types), see User Defined Fields Tab in the SoftwareShield License Manager Reference.

For help on setting and getting values stored in User Defined Fields at run time, see SetUDDate, GetUDDate, SetUDNumber, GetUDNumber in the SoftwareShield ClientProtector Reference.